package org.benjamin.lending.domain;

import org.springframework.data.domain.Page;

import java.util.List;

/**
 * Created by xywen on 2017/6/2.
 */
public class BJUIData {

    public BJUIData(Page page){
        this.list = page.getContent();
        this.totalRow = page.getTotalElements();
        this.pageCurrent = page.getNumber()+1;
    }

    public BJUIData(List<Object> objects,Page page){
        this.list = objects;
        this.totalRow = page.getTotalElements();
        this.pageCurrent = page.getNumber()+1;
    }

    private List<Object> list;

    private Long totalRow;

    private Integer pageCurrent;

    public List<Object> getList() {
        return list;
    }

    public void setList(List<Object> list) {
        this.list = list;
    }

    public Long getTotalRow() {
        return totalRow;
    }

    public void setTotalRow(Long totalRow) {
        this.totalRow = totalRow;
    }

    public Integer getPageCurrent() {
        return pageCurrent;
    }

    public void setPageCurrent(Integer pageCurrent) {
        this.pageCurrent = pageCurrent;
    }
}
